<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
		<link rel="stylesheet" href="../static/layui/css/layui.css"  media="all">
		<script src="../static/jquery-3.5.1.min.js"></script>
		<script src="../static/layui/layui.js"></script>
		<script>
			function change(title){
				let url = title+".html";
				$('iframe').attr('src',url);
			}
			
			function quit(){
				var params = {};
				params.typecode = 1;
				$.ajax({
				  xhrFields:{withCredentials: true},
				  type: "GET",
				  url: 'http://127.0.0.1:8000/api/v1/users/',
				  data: params,
				  contentType:'application/json;charset=UTF-8',
				  dataType:"json",
				  success:function(data){
				  		if(data.code==200){
							layer.msg("用户登出成功",function(){
				  		  })
				  		 }else{
				  		  layer.msg(data.msg);
				  		 }
				  }
				});
			}
		</script>
		
	</head>
	<body>
	 
	<div class="layui-layout layui-layout-admin">
	  <div class="layui-header">
	    <div class="layui-logo layui-hide-xs layui-bg-black">个人用户管理后台</div>
	    <!-- 头部区域（可配合layui 已有的水平导航） -->
		
		

      
	    <ul class="layui-nav layui-layout-right">
	      <li class="layui-nav-item layui-hide layui-show-md-inline-block">
	        <a href="javascript:;">
	          <img src="//tva1.sinaimg.cn/crop.0.0.118.118.180/5db11ff4gw1e77d3nqrv8j203b03cweg.jpg" class="layui-nav-img">
	        </a>
	        <dl class="layui-nav-child">
	          <dd><a href="javascript:;" onclick="change('personalInfo')">个人账号信息</a></dd>
			  <dd><a href="javascript:;" onclick="change('changeInfo')">修改个人信息</a></dd>
			  <dd><a href="javascript:;" onclick="change('changePassword')">修改密码</a></dd>
	          <dd><a href="javascript:;" onclick="quit()">退出登录</a></dd>
	        </dl>
	      </li>
	      <li class="layui-nav-item" lay-header-event="menuRight" lay-unselect>
	        <a href="javascript:;">
	          <i class="layui-icon layui-icon-more-vertical"></i>
	        </a>
	      </li>
	    </ul>
	  </div>
	  
	  <div class="layui-side layui-bg-black">
	    <div class="layui-side-scroll">
	      <!-- 左侧导航区域（可配合layui已有的垂直导航） -->
	      <ul class="layui-nav layui-nav-tree" lay-filter="test">
	        <li class="layui-nav-item layui-nav-itemed">
	          <a class="" href="javascript:;">资源管理</a>
	          <dl class="layui-nav-child">
	            <dd  class="layui-this"><a href="javascript:;" onclick="change('table')">我的资源列表</a></dd>
	          </dl>
			  <dl class="layui-nav-child">
			    <dd  class="layui-this"><a href="javascript:;" onclick="change('submit')">批量发布资源</a></dd>
			  </dl>
			  <dl class="layui-nav-child">
			    <dd  class="layui-this"><a href="javascript:;" onclick="change('submitOne')">发布单个资源</a></dd>
			  </dl>
			  <dl class="layui-nav-child">
			    <dd  class="layui-this"><a href="javascript:;" onclick="change('withdraw')">撤销资源</a></dd>
			  </dl>
	        </li>
	      </ul>
	    </div>
	  </div>
	  
	  <div class="layui-body">
	    <!-- 内容主体区域 -->
	    <div style="padding: 15px;">
	      
	        <div class="layui-card-body">
				<iframe src="table.html" frameborder="0" id="demoAdmin" style="width: 100%; height: 700px; border-radius: 2px;"></iframe>     
	        </div>
	      </div>
	      <br><br>
	      
	     
	      
	    </div>
	  </div>
	  
	  <div class="layui-footer">
	    <!-- 底部固定区域 -->
	    底部固定区域
	  </div>
	</div>
	<!-- <script src="../static/layui/layui.js" charset="utf-8"></script> -->
	<script>
	//JS 
	layui.use(['element', 'layer', 'util'], function(){
	  var element = layui.element
	  ,layer = layui.layer
	  ,util = layui.util
	  ,$ = layui.$;
	  
	  //头部事件
	  util.event('lay-header-event', {
	    //左侧菜单事件
	    menuLeft: function(othis){
	      layer.msg('展开左侧菜单的操作', {icon: 0});
	    }
	    ,menuRight: function(){
	      layer.open({
	        type: 1
	        ,title: '更多'
	        ,content: '<div style="padding: 15px;">处理右侧面板的操作</div>'
	        ,area: ['260px', '100%']
	        ,offset: 'rt' //右上角
	        ,anim: 5
	        ,shadeClose: true
	        ,scrollbar: false
	      });
	    }
	  });
	  
	});
	</script>
	</body>
</html>
